feat(gfn): GeForce NOW 原生客户端 (GFN-App) 控制器支持 - #1
Conversation
以 MaaNTE feat/gfn-app-support 的 PRD 与实测结论为蓝本,改写为 MaaEnd 语境(Go agent taskersink 架构)。范围限定 GFN 原生客户端(GFN-App), 明确控制器条目、Go 侧检测与窗口自动缩放、任务解锁范围与排除项、 与现有预检链的交互,以及待 Windows 实机验证的开放问题。 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- assets/interface.json 新增 GFN-App Win32 控制器(CEFCLIENT / Endfield.*on GeForce NOW / PrintWindow + Seize),窗口特征待实测回填 - 5 个 interface locale 同步 controller.GFN-App.label/.description Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- 新增 taskersink/gfnwindow:GFN-App 控制器下任务启动时把流窗口 客户区自动调整为 1280x720 基准(还原/居中/工作区校验/轮询确认), 失败时优雅降级不中断任务,经 maafocus 输出用户引导 - 缩放成功仍提示串流渲染分辨率在会话建立时锁定的已知限制 - controller info → HWND 解析提炼为 pkg/control.GetWin32Hwnd, aspectratio 改为复用,消除重复实现 - 注册顺序置于 aspectratio 之前,保证缩放先于分辨率强校验 - 新增 gfn-stream-hint / gfn-resize-failed HTML 模板与 5 语言文案 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
在所有含 Win32-Front 的任务 controller 数组中追加 GFN-App(43 处)。 排除依赖本地游戏安装的任务:pretasks/GameSetting(读取本地游戏配置)、 AccountSwitch(本地账号切换),详见 PRD FR3。 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
实测确认 GFN 原生客户端标题为 "Arknights: Endfield on GeForce NOW", 现有正则 Endfield.*on GeForce NOW 命中,关闭 PRD 风险 R1; 同步修正 FR2 缩放描述与实现一致(实测矩形差值而非 AdjustWindowRectEx)。 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
两个 GFN 实测问题修复(日志包 20260713-042409 / 20260713-045337):
1. gfnwindow 缩放成功后触发 PostScreencap 刷新控制器缓存分辨率。
此前 aspectratio 在同一次任务启动事件中读到缩放前的旧尺寸
(实测 1920x1200),导致首次运行被误停。
2. 新增 resource_gfn 覆盖资源,随 GFN-App 控制器 attach_resource_path
加载。GFN 串流帧经 H.264/HEVC 编码后颜色偏移数个单位,基础资源
1~2 单位宽的精确 ColorMatch 全部失配(实测品牌黄 hue 28-29 →
串流 26-31,连通像素 47/3000),SceneManager 颜色校准门禁必然
误报"颜色识别失败"。覆盖放宽:
- Common/Button/ButtonColor.json 黄/白/灰按钮底色容差
- SceneManager/SceneLoading.json 三个校准色块 Success 判定
(hue ±4、饱和度下限 200)
容差值按 on_error 截图实测校准。PRD 风险 R3 已回填定性结论。
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
使用显示器 rcWork 锚定(排除任务栏),缩放路径改贴右下角;客户区尺寸已匹配时仍单独执行一次仅移动的贴靠(SWP_NOSIZE),对齐 MaaNTE 97cc62e 的 bottom_right 行为。贴靠失败仅记 DEBUG,不影响任务继续。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
依上游 PR MaaEnd#4178 评审反馈 (@ocsin1):MaaEnd 的 Win32 分辨率预检只要求 16:9 且不主动缩放、不强制 720p;专用强制缩放与该契约相悖。 - 删除 taskersink/gfnwindow(强制 1280x720 缩放 + ±2px 容差 + 右下角贴靠) - register.go 不再注册 gfnwindow;GFN-App 作为 Win32 控制器直接走 aspectratio 预检(16:9 且 ≥1280x720,由 MaaFramework 缩放截图) - 移除孤立 i18n:gfn_stream_hint / gfn_resize_failed(i18n.go + 2 个 HTML 模板 + 5 个 go-service locale 各 7 键) - PRD 回填设计变更:记录评审反馈、与 MaaNTE PinkPawHeist(硬性精确 720p,因其 pipeline 不走缩放)的对比,重写 FR2/FR4/R4/目标/验收标准 - 保留 pkg/control.GetWin32Hwnd(aspectratio 仍复用)与 resource_gfn 颜色容差覆盖 框架侧无需改动:MaaFramework Win32 控制器已通过 PrintWindow(PW_CLIENTONLY | PW_RENDERFULLCONTENT) 支持 CEF 流窗口截图,Seize 输入与 class_regex 匹配均为通用能力。 验证:gofmt 干净;go build ./... 在 linux + windows 双目标通过;5 个 locale JSON 合法。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
PR Summary by QodoAdd GFN-App Win32 controller for GeForce NOW native client (foreground + Seize)
AI Description
Diagram
High-Level Assessment
Files changed (51)
|
|
这个功能建议在maafw支持,属于通用控制器的范围,对于项目来说太重了 |
Replace the hand-written Win32 block (CEFCLIENT / Endfield.*on GeForce NOW /
PrintWindow / Seize) with the framework's Cloud preset:
"type": "Cloud",
"cloud": { "provider": "geforce_now", "game_title": "Endfield" }
The framework/MXU resolve the GFN window and screencap/input methods from the
provider, so the config no longer repeats the CEF/PrintWindow/Seize details.
attach_resource_path (resource_gfn colour overrides) is unchanged.
Requires a MaaFramework + MXU build that includes the Cloud controller
(MaaXYZ/MaaFramework + MistEO/MXU Cloud support); stock builds do not
recognise type:"Cloud".
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The GFN-App migration to type:"Cloud" failed JSON-schema validation because the bundled tools/schema/interface.schema.json predates the Cloud controller. Add "Cloud" to the controller type enum and a "cloud" config block (provider + game_title), mirroring the MaaFramework schema. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
概述
新增 GeForce NOW 原生客户端(GFN-App) 控制器支持,让终末地云串流玩家也能使用前台(Win32 + Seize)模式运行任务。
主要改动
FR1 — GFN-App 控制器(
assets/interface.json+ locales)GFN-App控制器:type=Win32,class_regex=CEFCLIENT、window_regex=Endfield.*on GeForce NOW,screencap=PrintWindow、mouse/keyboard=Seize。controller.GFN-App.label/description文案。FR3 — 任务控制器解锁(
assets/tasks/**)Win32-Front的任务追加GFN-App,排除依赖本地游戏安装/进程的任务。FR4 — 串流压缩色差覆盖资源(
resource_gfn)ButtonColor.json/SceneLoading.json颜色容差覆盖,随 GFN-App 控制器attach_resource_path加载。设计变更(依上游 PR MaaEnd#4178 评审反馈 @ocsin1)
评审指出 MaaEnd 的 Win32 分辨率预检只要求 16:9、不主动缩放、不强制 720p;原设计新增的强制 1280x720 缩放 sink 与该契约相悖。据此:
taskersink/gfnwindow(强制缩放 + ±2px 容差 + 右下角贴靠),GFN-App 作为type=Win32控制器直接复用既有aspectratio预检(16:9 且 ≥1280x720,MaaFramework 对截图缩放)。gfn_stream_hint/gfn_resize_failed(i18n.go+ 2 个 HTML 模板 + 5 个 go-service locale 各 7 键)。pkg/control.GetWin32Hwnd(aspectratio仍复用)与resource_gfn颜色容差覆盖。对比佐证:姊妹项目 MaaNTE 的
PinkPawHeist硬性要求精确 1280x720(其 pipeline ROI 不走缩放);MaaEnd pipeline 走 MaaFramework 缩放,任意 16:9 ≥720p 均可,故不继承精确 720p 与 ±2px 容差逻辑。框架侧无需改动:MaaFramework Win32 控制器已通过
PrintWindow(PW_CLIENTONLY | PW_RENDERFULLCONTENT)支持 CEF 流窗口截图,Seize输入与class_regex匹配均为通用能力。测试
gofmt干净;go build ./...在 linux + windows 双目标通过;5 个 locale JSON 合法。🤖 Generated with Claude Code